home *** CD-ROM | disk | FTP | other *** search
/ Robotics & Artificial Int…3 (Professional Edition) / Robotics & Artificial Intelligence Tools 2003 (Professional Edition).iso / computer vision recognition / rcinstall.exe / Disk1 / data1.cab / ASP_Pages / global.asa < prev    next >
Encoding:
Text File  |  2001-12-12  |  694 b   |  24 lines

  1. <SCRIPT LANGUAGE=VBScript RUNAT=Server>
  2. Sub Application_OnStart
  3.     Dim Vroot,iCount,idx
  4.     Vroot = Server.MapPath("Default.asp")
  5.     iCount = 0
  6.     idx = InStrRev(Vroot, "\")
  7.     if (idx > 0) and (idx < len(Vroot)) then
  8.             Vroot = Left(Vroot,idx-1)
  9.     end if
  10.     Application("PubTypesPath")=Vroot & "\PubTypes"
  11.     Application("XMLDirectory")=Vroot & "\XMLBATCH"
  12.     Application("SiteIDFile")=Vroot & "\siteid.txt"
  13.     Application("LogFile")=Vroot & "\csweblog.txt"
  14. End Sub
  15.  
  16. Sub Session_OnStart
  17.     if (InStr(Request.ServerVariables("URL"),"Default.asp")<1) then
  18.         if (InStr(Request.ServerVariables("URL"),"About.asp")<1) then
  19.             Response.Redirect("Default.asp")
  20.         end if    
  21.     end if  
  22. End Sub
  23. </SCRIPT>
  24.